package cn.cjxy.springmvcdemo1.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

//实现Controller接口   需要在mvc配置文件中再次配置bean
public class Controller01 implements Controller {
	@Override
	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
		System.out.println(this.getClass());
		//模型数据和视图对象
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.setViewName("/WEB-INF/controller.jsp");
		return modelAndView;
	}
}